package com.dyc.caradvertisting.ui.fmt.linkmain;

import com.dyc.caradvertisting.bean.req.RequestBean;
import com.dyc.caradvertisting.constants.Constant;
import com.dyc.caradvertisting.ui.fmt.bind.BindSerContract;

import java.util.Map;

import rx.Observable;
import rx.Observer;


/**
 * Created by niejiahuan on 2016/5/31.
 */
public class LinMainPresenter extends LinkMainContract.Presenter {


    @Override
    public Observable getDate(Map<String, String> params) {
        return null;
    }

    @Override
    public void onStart() {

    }

    @Override
    public void reqGainLinkMain(String param) {
        RequestBean requestBean=new RequestBean(Constant.REQ_CHANG_LX,param);
        mModel.reqGainLinkMain(requestBean.getAct()+"",
                requestBean.getAct()+"",
                requestBean.getParam(),
                requestBean.getSign(),
                requestBean.getStrtime()+"").subscribe(new Observer() {
            @Override
            public void onCompleted() {

            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onNext(Object o) {

            }
        });
    }

    @Override
    public void reqChangeLinkMain(String param) {
        RequestBean requestBean=new RequestBean(Constant.REQ_LINKMAN,param);
        mModel.reqChangeLinkMain(requestBean.getAct()+"",
                requestBean.getAct()+"",
                requestBean.getParam(),
                requestBean.getSign(),
                requestBean.getStrtime()+"").subscribe(new Observer() {
            @Override
            public void onCompleted() {

            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onNext(Object o) {

            }
        });
    }
}
